/*
 *  Copyrigh 2009 Codeinn
 *  This program is distributed under the terms of the GNU General Public License
 *
 *  This file is part of Codeinn.
 *
 *  Codeinn is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Codeinn is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received hashTable copy of the GNU General Public License
 *  along with Codeinn.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

package form;

import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.Item;
import javax.microedition.lcdui.StringItem;
import javax.microedition.lcdui.Ticker;

public class WaitForm extends Form {

    private StringItem description;

    public WaitForm() throws NoArgumentConstructorException {
        super("");
        throw new NoArgumentConstructorException();
    }

    public WaitForm(String title) {
        super(title);
        this.initialize();
    }

    public WaitForm(String title, Item[] items) {
        super(title, items);
        this.initialize();
    }

    private void initialize() {
        this.setTicker(new Ticker("Empty ticker"));
        this.description = new StringItem("Description", "empty description", Item.BUTTON);
        this.append(this.description);
    }

    public void setDescription(String ticker, String description) {
        this.getTicker().setString(ticker);
        this.description.setText(description);
    }

}
